package com.majorty.mb.controller.response;

/**
 * 基本响应封装
 * @author zhangshuai
 * @date 2019-09-22 22:35:00
 */
public class BaseResponse {

	/**
	 * 响应码
	 */
	private int code;

	/**
	 * 响应消息
	 */
	private String message;

	protected BaseResponse() {}

	protected BaseResponse(CodeEnum code) {
		this.code = code.getCode();
		this.message = code.getMessage();
	}

	public static BaseResponse out(CodeEnum code) {
		return new BaseResponse(code);
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}


}
